package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 代购订单（purchase agency）对象 pa_order
 * 
 * @author ruoyi
 * @date 2024-07-03
 */
@ApiModel("代购订单（purchase agency）")
public class PaOrder extends BaseEntity
{

    private static final long serialVersionUID = 1L;

    /** 订单ID */
    @ApiModelProperty("订单ID")
    private Long orderId;

    /** 供应商id */
    @ApiModelProperty("供应商id")
    @Excel(name = "供应商id")
    private Long supplierId;

    /** 产品名称,多个产品将会以逗号隔开 */
    @Excel(name = "产品名称,多个产品将会以逗号隔开")
    @ApiModelProperty("产品名称,多个产品将会以逗号隔开")
    private String prodName;

    /** 订购用户ID */
    @ApiModelProperty("订购用户ID")
    @Excel(name = "订购用户ID")
    private Long userId;

    /** 订购流水号 */
    @Excel(name = "订购流水号")
    @ApiModelProperty("订购流水号")
    private String orderNumber;

    /** 报价总值 */
    @Excel(name = "报价总值")
    @ApiModelProperty("报价总值")
    private BigDecimal total;

    /** 实际总值 */
    @Excel(name = "实际总值")
    @ApiModelProperty("实际总值")
    private BigDecimal actualTotal;

    /** 支付方式 0 手动代付 1 微信支付 2 支付宝 */
    @Excel(name = "支付方式 0 手动代付 1 微信支付 2 支付宝")
    @ApiModelProperty("支付方式 0 手动代付 1 微信支付 2 支付宝")
    private Integer payType;

    /** 订单备注 */
    @Excel(name = "订单备注")
    private String remarks;

    /** 订单状态 1:报价中  2：确认报价（采购处理）3：待签合同(采购处理)  4:生产中（供应商处理） 5:拼柜待发货 6:预计拖柜（运输中） 7:完成（采购处理） 8:失败 */
    @Excel(name = "订单状态 1:报价中  2：确认报价", readConverterExp = "采=购处理")
    @ApiModelProperty("订单状态 1:报价中  2：确认报价（采购处理）3：待签合同(采购处理)  4:生产中（供应商处理） 5:拼柜待发货 6:预计拖柜（运输中） 7:完成（采购处理） 8:失败")
    private Integer status;

    /** 订单商品总数 */
    @Excel(name = "订单商品总数")
    @ApiModelProperty("订单商品总数")
    private Integer productNums;

    /** 付款时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /** 发货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date dvyTime;

    /** 完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date finallyTime;

    /** 取消时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "取消时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date cancelTime;

    /** 是否已经支付，1：已经支付过，0：，没有支付过 */
    @Excel(name = "是否已经支付，1：已经支付过，0：，没有支付过")
    private Integer isPayed;

    /** 用户订单删除状态，0：没有删除， 1：回收站， 2：永久删除 */
    @ApiModelProperty(name = "用户订单删除状态，0：没有删除， 1：回收站， 2：永久删除")
    private Integer delFlag;

    /** 0:默认,1:在处理,2:处理完成 */
    @Excel(name = "0:默认,1:在处理,2:处理完成")
    @ApiModelProperty(name = "0:默认,1:在处理,2:处理完成")
    private Integer refundSts;

    /** 订单类型1:代购单 */
    @Excel(name = "订单类型1:代购单")
    @ApiModelProperty(name = "订单类型1:代购单")
    private Integer orderType;

    /** 订单关闭原因 1-未同意报价 2-退款关闭 4-买家取消 15-已通过货到付款交易 */
    @Excel(name = "订单关闭原因 1-未同意报价 2-退款关闭 4-买家取消 15-已通过货到付款交易")
    @ApiModelProperty(name = "订单关闭原因 1-未同意报价 2-退款关闭 4-买家取消 15-已通过货到付款交易")
    private Integer closeType;

    /** 是否是复购单1：不是复购2：是复购 */
    @Excel(name = "是否是复购单1：不是复购2：是复购")
    @ApiModelProperty(name = "是否是复购单1：不是复购2：是复购")
    private Integer isRepurchase;


    /** 实际商品总数 */
    @Excel(name = "实际商品总数")
    @ApiModelProperty(value = "实际商品总数")
    private Integer actualProductNums;


    public void setOrderId(Long orderId)
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }
    public void setSupplierId(Long supplierId) 
    {
        this.supplierId = supplierId;
    }

    public Long getSupplierId() 
    {
        return supplierId;
    }
    public void setProdName(String prodName) 
    {
        this.prodName = prodName;
    }

    public String getProdName() 
    {
        return prodName;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setOrderNumber(String orderNumber) 
    {
        this.orderNumber = orderNumber;
    }

    public String getOrderNumber() 
    {
        return orderNumber;
    }
    public void setTotal(BigDecimal total) 
    {
        this.total = total;
    }

    public BigDecimal getTotal() 
    {
        return total;
    }
    public void setActualTotal(BigDecimal actualTotal) 
    {
        this.actualTotal = actualTotal;
    }

    public BigDecimal getActualTotal() 
    {
        return actualTotal;
    }
    public void setPayType(Integer payType) 
    {
        this.payType = payType;
    }

    public Integer getPayType() 
    {
        return payType;
    }
    public void setRemarks(String remarks) 
    {
        this.remarks = remarks;
    }

    public String getRemarks() 
    {
        return remarks;
    }
    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }
    public void setProductNums(Integer productNums) 
    {
        this.productNums = productNums;
    }

    public Integer getProductNums() 
    {
        return productNums;
    }
    public void setPayTime(Date payTime) 
    {
        this.payTime = payTime;
    }

    public Date getPayTime() 
    {
        return payTime;
    }
    public void setDvyTime(Date dvyTime) 
    {
        this.dvyTime = dvyTime;
    }

    public Date getDvyTime() 
    {
        return dvyTime;
    }
    public void setFinallyTime(Date finallyTime) 
    {
        this.finallyTime = finallyTime;
    }

    public Date getFinallyTime() 
    {
        return finallyTime;
    }
    public void setCancelTime(Date cancelTime) 
    {
        this.cancelTime = cancelTime;
    }

    public Date getCancelTime() 
    {
        return cancelTime;
    }
    public void setIsPayed(Integer isPayed) 
    {
        this.isPayed = isPayed;
    }

    public Integer getIsPayed() 
    {
        return isPayed;
    }
    public void setDelFlag(Integer delFlag) 
    {
        this.delFlag = delFlag;
    }

    public Integer getDelFlag() 
    {
        return delFlag;
    }
    public void setRefundSts(Integer refundSts) 
    {
        this.refundSts = refundSts;
    }

    public Integer getRefundSts() 
    {
        return refundSts;
    }
    public void setOrderType(Integer orderType) 
    {
        this.orderType = orderType;
    }

    public Integer getOrderType() 
    {
        return orderType;
    }
    public void setCloseType(Integer closeType) 
    {
        this.closeType = closeType;
    }

    public Integer getCloseType() 
    {
        return closeType;
    }
    public void setIsRepurchase(Integer isRepurchase) 
    {
        this.isRepurchase = isRepurchase;
    }

    public Integer getIsRepurchase() 
    {
        return isRepurchase;
    }

    public void setActualProductNums(Integer actualProductNums)
    {
        this.actualProductNums = actualProductNums;
    }

    public Integer getActualProductNums()
    {
        return actualProductNums;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("supplierId", getSupplierId())
            .append("prodName", getProdName())
            .append("userId", getUserId())
            .append("orderNumber", getOrderNumber())
            .append("total", getTotal())
            .append("actualTotal", getActualTotal())
            .append("payType", getPayType())
            .append("remarks", getRemarks())
            .append("status", getStatus())
            .append("productNums", getProductNums())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("payTime", getPayTime())
            .append("dvyTime", getDvyTime())
            .append("finallyTime", getFinallyTime())
            .append("cancelTime", getCancelTime())
            .append("isPayed", getIsPayed())
            .append("delFlag", getDelFlag())
            .append("refundSts", getRefundSts())
            .append("orderType", getOrderType())
            .append("closeType", getCloseType())
            .append("isRepurchase", getIsRepurchase())
            .toString();
    }
}
